import React from "react";
import {withRouter} from 'react-router-dom';

function Center(props) {
    return <div>
        center
        <button onClick={() => props.history.push("/music")}>点击跳转</button>
    </div>
}

// withRouter作用: 父组件Route没传Props 只能通过withRouter来获取
export default withRouter(Center);